package com.preview.controller;

import com.feign.domain.bo.FileBo;
import com.preview.service.PreviewService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@RestController
@RequestMapping("/preview")
public class PreviewController {

    @Autowired
    private PreviewService previewService;

    @GetMapping("/test")
    public boolean test() {
        return true;
    }

    @PostMapping("/icon")
    public void previewIcon(@RequestBody FileBo fileBo) throws Exception {
        previewService.previewIcon(fileBo.getFilePath());
    }

}
